package test.day214;

/**
 * @author oldliu
 * @since 1.0
 */
public class TimeThread extends Thread {
    private final LoginStatus l;

    public TimeThread(LoginStatus l){
        this.l=l;
    }

    @Override
    public void run() {
        try {
            sleep(10*1000);
            if(l.isOk()==false){
                System.out.println("您超时了！");
                System.exit(1);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
